package com.tiny.work.plane;

import com.alibaba.fastjson.annotation.JSONField;
import java.io.Serializable;
import java.util.Date;

public class ArrangePilot implements Serializable {

    Pilot pilot;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    Date curTime;


    public Pilot getPilot() {
        return pilot;
    }

    public ArrangePilot setPilot(Pilot pilot) {
        this.pilot = pilot;
        return this;
    }

    public Date getCurTime() {
        return curTime;
    }

    public ArrangePilot setCurTime(Date curTime) {
        this.curTime = curTime;
        return this;
    }

    public boolean canOrder() {
        Pilot pilot = this.pilot;
        for (IRuler iRuler : pilot.getOrderRulerList()) {
            if (!iRuler.isMatch(this)) {
                return false;
            }
        }
        return true;
    }
}
